home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_casm / snip9611.zip / CRC.H < prev    next >
C/C++ Source or Header  |  1996-11-24  |  988b  |  58 lines

  1. /* +++Date last modified: 02-Nov-1995 */
  2.  
  3. /*
  4. **  CRC.H - header file for SNIPPETS CRC and checksum functions
  5. */
  6.  
  7. #ifndef CRC__H
  8. #define CRC__H
  9.  
  10. #include <stdlib.h>           /* For size_t                 */
  11. #include "sniptype.h"         /* For BYTE, WORD, DWORD      */
  12.  
  13. /*
  14. **  File: ARCCRC16.C
  15. */
  16.  
  17. void init_crc_table(void);
  18. WORD crc_calc(WORD crc, char *buf, unsigned nbytes);
  19. void do_file(char *fn);
  20.  
  21. /*
  22. **  File: CRC-16.C
  23. */
  24.  
  25. WORD crc16(char *data_p, WORD length);
  26.  
  27. /*
  28. **  File: CRC-16F.C
  29. */
  30.  
  31. WORD updcrc(WORD icrc, BYTE *icp, size_t icnt);
  32.  
  33. /*
  34. **  File: CRC_32.C
  35. */
  36.  
  37. #define UPDC32(octet,crc) (crc_32_tab[((crc)\
  38.      ^ (octet)) & 0xff] ^ ((crc) >> 8))
  39.  
  40. Boolean_T crc32file(char *name, DWORD *crc, long *charcnt);
  41. DWORD crc32buf(char *buf, size_t len);
  42.  
  43. /*
  44. **  File: CHECKSUM.C
  45. */
  46.  
  47. unsigned checksum(void *buffer, size_t len, unsigned int seed);
  48.  
  49. /*
  50. **  File: CHECKEXE.C
  51. */
  52.  
  53. void checkexe(char *fname);
  54.  
  55.  
  56.  
  57. #endif /* CRC__H */
  58.